package com.canyou.system.entity.org;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 机构新增编辑模型
 *
 * @author fy
 * @date 2021/5/19 9:25
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "OrgDTO", description = "机构新增编辑模型")
public class OrgDTO {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "上级机构id")
    @NotNull(message = "上级机构id不能为空")
    private Long parentId;

    @ApiModelProperty(value = "机构名称")
    @NotBlank(message = "机构名称不能为空")
    private String orgName;

    @ApiModelProperty(value = "联系人")
    private String contacts;

    @ApiModelProperty(value = "联系方式")
    private String tel;

    @ApiModelProperty(value = "联系地址")
    private String address;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "乐观锁版本")
    private Long version;

}
